package  com.vcar.LDiceClient.amfRequester.sz
{
    import flash.utils.Dictionary;

    public class JobManager
    {
        private static var jobMap:Dictionary=new Dictionary(true);
        public function JobManager()
        {
        }
        public static function add(jobId:uint,handler:Function,msg:String="加入job时的信息"):void
        {		
            trace('JobManager.add id is : ' + jobId);
            if(jobMap[jobId]==null){
                trace('JobManager.add jobMap[jobId]==null');
                jobMap[jobId]=new JobQuery(jobId,handler,msg);	
            }	
        }
        public static function deleteJob(job:JobQuery):void
        {
            trace('clean job map id is : ' + job.jobId);
            job.handler = null;
            delete jobMap[job.jobId];
        }
    }
}

